<? if(!defined('UC_ROOT')) exit('Access Denied');?>
<script type="text/javascript">
function checkall(form, prefix, checkall) {
	var checkall = checkall ? checkall : 'chkall';
	for(var i = 0; i < form.elements.length; i++) {
		var e = form.elements[i];
		if(e.name && e.name != checkall && (!prefix || (prefix && e.name.match(prefix)))) {
			e.checked = form.elements[checkall].checked;
		}
	}
}

function toggle_collapse(objname, ctrlobj) {
	var obj = document.getElementById(objname);
	if(obj.style.display == '') {
		obj.style.display = 'none';
		ctrlobj.innerHTML = '<img src="images/default/spread.gif" />';
	} else {
		obj.style.display = '';
		ctrlobj.innerHTML = '<img src="images/default/shrink.gif" />';
	}
}

function ctlent(event) {
	if((event.ctrlKey && event.keyCode == 13) || (event.altKey && event.keyCode == 83)) {
		document.getElementById('postpmform').saveoutbox.value = 0;
		document.getElementById('postpmform').submit();
	}
}
</script>

<div class="ucnav">
<a <? if($folder == 'inbox' && !$filter) { ?>class="ucontype" <? } ?>href="index.php?m=pm_client&a=ls&folder=inbox">短消息<? if($pmnum[1]) { ?><strong>[<?=$pmnum[1]?>]</strong><? } ?></a>
<? if($pmnum[4] || $filter == 'announcepm') { ?>
<a <? if($filter == 'announcepm') { ?>class="ucontype" <? } ?>href="index.php?m=pm_client&a=ls&folder=inbox&filter=announcepm">公共消息[<?=$pmnum[4]?>]</a>
<? } ?>
<a <? if($folder == 'savebox' || $folder == 'send' && $a == 'savebox') { ?>class="ucontype" <? } ?>href="index.php?m=pm_client&a=ls&folder=savebox">草稿箱</a>
<a <? if($folder == 'blackls') { ?>class="ucontype" <? } ?>href="index.php?m=pm_client&a=ls&folder=blackls">忽略列表</a>
<a <? if($type == '' && $folder == 'send' && $a != 'savebox') { ?>class="ucontype sendpmontype" <? } else { ?> class="sendpm" <? } ?>href="index.php?m=pm_client&a=send">发送短消息</a>

<? if($unreadpmnum || $pmnum[3] || $folder == 'newbox' || $filter == 'systempm') { ?>
	<span class="navinfo">
		<img src="images/default/newpm.gif" />
		<? if($unreadpmnum || $folder == 'newbox') { ?><strong><?=$unreadpmnum?></strong> <a <? if($folder == 'newbox') { ?>class="ontype" <? } ?>href="index.php?m=pm_client&a=ls&folder=newbox">条未读消息</a><? } ?>
		<? if($pmnum[3] || $filter == 'systempm') { ?><strong><?=$pmnum[3]?></strong> <a <? if($filter == 'systempm') { ?>class="ontype" <? } ?>href="index.php?m=pm_client&a=ls&folder=inbox&filter=systempm">条系统消息</a><? } ?>
	</span>
<? } ?>
</div>